# - Try to find lxc
#

message(STATUS "TARGET is ${CMAKE_SYSTEM_NAME}.${CMAKE_SYSTEM_PROCESSOR}")

set(LXC_VERSION 3.0.3)
set(PREBUILT_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}/../../libs)

find_path(LXC_INCLUDE_DIR lxc lxc/lxc.h
   HINTS ${PREBUILT_LIBRARIES}/lxc-${LXC_VERSION}/include
)

find_library(LXC_LIBRARY NAMES liblxc.so
   HINTS ${PREBUILT_LIBRARIES}/lxc-${LXC_VERSION}/linux/${CMAKE_SYSTEM_PROCESSOR}/lib
)

set(LXC_LIBRARIES ${LXC_LIBRARY} )
set(LXC_INCLUDE_DIRS ${LXC_INCLUDE_DIR} )

include(FindPackageHandleStandardArgs)

# handle the QUIETLY and REQUIRED arguments and set LXC_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(LXC DEFAULT_MSG LXC_LIBRARY LXC_INCLUDE_DIR)

mark_as_advanced(LXC_INCLUDE_DIR LXC_LIBRARY)
